package org.kzwl.book.controller.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.kzwl.comm.pojo.ResponseData;
import org.kzwl.comm.pojo.bo.menu.MenuBasicBO;
import org.kzwl.comm.pojo.dto.menu.MenuDTO;
import org.kzwl.service.web.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;


@Slf4j
@RestController
@RequestMapping("/menu")
@Api("PC菜单管理")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @ApiOperation(value = "查询菜单")
    @PostMapping("/queryBasic")
    public ResponseData<List<MenuDTO>> queryBasic(@RequestBody MenuBasicBO bo) {
        List<MenuDTO> list = menuService.queryBasic(bo);
        return new ResponseData<>(list);
    }

}
